#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>

typedef int HeapDataType;
typedef struct Heap
{
	HeapDataType* data;
	int size;
	int capacity;
}Heap;

void HeapInit(Heap* p);
void HeapDestory(Heap* p);
void AdjustUp(Heap* p, int child);
void HeapPush(Heap* p, HeapDataType x);
void AdjustDown(Heap* p, int parent, int size);
void HeapPop(Heap* p);
bool HeapEmpty(Heap* p);
HeapDataType HeapTop(Heap* p);